﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace SmartFactory.Controllers
{
	public class ProductionController : Controller
	{
		private readonly IpAddressesConfig _ipAddressesConfig;

		public ProductionController(IOptions<IpAddressesConfig> ipAddressesConfig)
		{
			_ipAddressesConfig = ipAddressesConfig.Value;
		}
		/// <summary>
		/// 生产计划列表
		/// </summary>
		/// <returns></returns>
		public IActionResult ProductionList()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
		}
		/// <summary>
		/// 生产添加
		/// </summary>
		/// <returns></returns>
		public IActionResult ProductionAdd()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
		}
		/// <summary>
		/// 生产明细列表数据获取
		/// </summary>
		/// <returns></returns>
		public IActionResult ProductionShow()
		{
			ViewBag.Darius = _ipAddressesConfig.Darius;
			ViewBag.Durian = _ipAddressesConfig.Durian;
			ViewBag.GlennQuigmrire = _ipAddressesConfig.GlennQuigmrire;
			ViewBag.Keep = _ipAddressesConfig.Keep;
			return View();
		}
	}
}
